using System;

/// <summary> 属性（注解）的测试
namespace AttributeTest {

    public class HelpAttribute : Attribute {

        string _url;
        string _topic;

        public HelpAttribute(string url) => _url = url;

        public string Url => _url;

        public string Topic {
            get => _topic;
            set => _topic = value;
        }
    }

    [Help("https://docs.microsoft.com/dotnet/csharp/tour-of_csharp/features")]
    public class Widget {

        [Help("http://docs.microsoft.com/dotnet/csharp/tour-of-csharp/features",
            Topic="Display")]
        /// <summary> 
        public void Display(string text) {
            Console.WriteLine($"Display({text})");
        }
    }
}